package org.water.common.web;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.water.base.entity.R;

@RestController
@RequestMapping("/error")
public class ErrorController {

	/**
	 * 默认错误信息
	 * @param request
	 * @return
	 */
	@RequestMapping("/default")
	public R error(HttpServletRequest request)
	{
		return R.instance().setMsg("未知错误");
	}
	/**
	 * 默认错误信息
	 * @param request
	 * @return
	 */
	@RequestMapping("/500")
	public R error500(HttpServletRequest request)
	{
		return R.instance().setMsg("系统内部错误");
	}
	/**
	 * 默认错误信息
	 * @param request
	 * @return
	 */
	@RequestMapping("/404")
	public R error404(HttpServletRequest request)
	{
		return R.instance().setMsg("服务未发现");
	}
}
